/**
 *
 (2)定义类Kids继承ManKind，并包括
 - 成员变量int yearsOld；
 - 方法printAge()打印yearsOld的值。
 */
public class Kids extends ManKind{
    private  int yearsOld;

    public Kids() {

    }

    public Kids(int sex, int salary, int yearsOld) {
        super(sex, salary);
        this.yearsOld = yearsOld;
    }


    public int getYearsOld() {
        return yearsOld;
    }

    public void setYearsOld(int yearsOld) {
        this.yearsOld = yearsOld;
    }

    public void printAge(){
        System.out.println("i am" + yearsOld);
    }


    //修改继承内容的练习1中定义的类Kids，在Kids中重新定义employeed()方法，

    //覆盖父类ManKind中定义的employeed()方法，输出"Kids should study and no job."

    @Override
    public void employeed() {
        super.employeed();
        System.out.println("kids should study and no job");;
    }
    //修改方法重写的练习2中定义的类Kids中employeed()方法，在该方法中调用父类ManKind的employeed()方法，
    //然后再输出"but Kids should study and no job."
}
